﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace WaveringLand_Launcher.Helper.Common
{
    public class Md5Helper
    {
        public static string GetMd5(string apath)
        {
            string md5 = "";
            using (var fs = new FileStream(apath, FileMode.Open))
            {
                md5 = BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(fs)).Replace("-", "");
            }

            return md5;
        }
    }
}
